package service

import (
	"go-ws-server/utils"
)

// 方法1：根据用户Id判断用户是否在线
func IsUserOnline(userId string) (bool, error) {
	const key = "online:users"
	return utils.SIsMember(key, userId)
}
